3.218 \(\int \frac {\tan (c+d x)}{\csc (c+d x)+\sin (c+d x)} \, dx\)

Optimal. Leaf size=29 \[ \frac {\tanh ^{-1}(\sin (c+d x))}{2 d}-\frac {\tan ^{-1}(\sin (c+d x))}{2 d} \]

[Out]

-1/2*arctan(sin(d*x+c))/d+1/2*arctanh(sin(d*x+c))/d

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {298, 203, 206} \[ \frac {\tanh ^{-1}(\sin (c+d x))}{2 d}-\frac {\tan ^{-1}(\sin (c+d x))}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[Tan[c + d*x]/(Csc[c + d*x] + Sin[c + d*x]),x]

[Out]

-ArcTan[Sin[c + d*x]]/(2*d) + ArcTanh[Sin[c + d*x]]/(2*d)

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 298

Int[(x_)^2/((a_) + (b_.)*(x_)^4), x_Symbol] :> With[{r = Numerator[Rt[-(a/b), 2]], s = Denominator[Rt[-(a/b),
2]]}, Dist[s/(2*b), Int[1/(r + s*x^2), x], x] - Dist[s/(2*b), Int[1/(r - s*x^2), x], x]] /; FreeQ[{a, b}, x] &
&  !GtQ[a/b, 0]

Rubi steps

\begin {align*} \int \frac {\tan (c+d x)}{\csc (c+d x)+\sin (c+d x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {x^2}{1-x^4} \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac {\operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sin (c+d x)\right )}{2 d}-\frac {\operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sin (c+d x)\right )}{2 d}\\ &=-\frac {\tan ^{-1}(\sin (c+d x))}{2 d}+\frac {\tanh ^{-1}(\sin (c+d x))}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 24, normalized size = 0.83 \[ \frac {\tanh ^{-1}(\sin (c+d x))-\tan ^{-1}(\sin (c+d x))}{2 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[c + d*x]/(Csc[c + d*x] + Sin[c + d*x]),x]

[Out]

(-ArcTan[Sin[c + d*x]] + ArcTanh[Sin[c + d*x]])/(2*d)

________________________________________________________________________________________

fricas [A]  time = 0.44, size = 37, normalized size = 1.28 \[ -\frac {2 \, \arctan \left (\sin \left (d x + c\right )\right ) - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (-\sin \left (d x + c\right ) + 1\right )}{4 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)/(csc(d*x+c)+sin(d*x+c)),x, algorithm="fricas")

[Out]

-1/4*(2*arctan(sin(d*x + c)) - log(sin(d*x + c) + 1) + log(-sin(d*x + c) + 1))/d

________________________________________________________________________________________

giac [A]  time = 0.39, size = 37, normalized size = 1.28 \[ -\frac {2 \, \arctan \left (\sin \left (d x + c\right )\right ) - \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) + \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{4 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)/(csc(d*x+c)+sin(d*x+c)),x, algorithm="giac")

[Out]

-1/4*(2*arctan(sin(d*x + c)) - log(abs(sin(d*x + c) + 1)) + log(abs(sin(d*x + c) - 1)))/d

________________________________________________________________________________________

maple [A]  time = 0.16, size = 42, normalized size = 1.45 \[ -\frac {\ln \left (\sin \left (d x +c \right )-1\right )}{4 d}+\frac {\ln \left (\sin \left (d x +c \right )+1\right )}{4 d}-\frac {\arctan \left (\sin \left (d x +c \right )\right )}{2 d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)/(csc(d*x+c)+sin(d*x+c)),x)

[Out]

-1/4/d*ln(sin(d*x+c)-1)+1/4/d*ln(sin(d*x+c)+1)-1/2*arctan(sin(d*x+c))/d

________________________________________________________________________________________

maxima [A]  time = 0.55, size = 35, normalized size = 1.21 \[ -\frac {2 \, \arctan \left (\sin \left (d x + c\right )\right ) - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )}{4 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)/(csc(d*x+c)+sin(d*x+c)),x, algorithm="maxima")

[Out]

-1/4*(2*arctan(sin(d*x + c)) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1))/d

________________________________________________________________________________________

mupad [B]  time = 0.69, size = 61, normalized size = 2.10 \[ \frac {\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {\mathrm {atan}\left (\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{2}+\frac {5\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}\right )-\mathrm {atan}\left (\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}\right )}{2\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(c + d*x)/(sin(c + d*x) + 1/sin(c + d*x)),x)

[Out]

atanh(tan(c/2 + (d*x)/2))/d - (atan((5*tan(c/2 + (d*x)/2))/2 + tan(c/2 + (d*x)/2)^3/2) - atan(tan(c/2 + (d*x)/
2)/2))/(2*d)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\tan {\left (c + d x \right )}}{\sin {\left (c + d x \right )} + \csc {\left (c + d x \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)/(csc(d*x+c)+sin(d*x+c)),x)

[Out]

Integral(tan(c + d*x)/(sin(c + d*x) + csc(c + d*x)), x)

________________________________________________________________________________________